package com.jk.controller;

import com.jk.dto.TbTeacher;
import com.jk.interfaces.TbTeacherServiceApi;
import com.jk.pojo.PagedResponse;
import com.jk.service.TbTeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yzf
 * @version 1.0
 * @description: TODO
 * @date 2024/12/11 11:00
 */
@RestController
public class TbTeacherController implements TbTeacherServiceApi {
    @Autowired
    private TbTeacherService tbTeacherService;

    @Override
    public PagedResponse<TbTeacher> findTeacherList(TbTeacher tbTeacher, Integer pageNum, Integer pageSize) {
        return tbTeacherService.findTeacherList(tbTeacher, pageNum, pageSize);
    }

    @Override
    public void delTeacherById(Integer id) {
        tbTeacherService.delTeacherById(id);
    }

    @Override
    public void addTeacher(TbTeacher tbTeacher) {
        tbTeacherService.addTeacher(tbTeacher);
    }

    @Override
    public TbTeacher getTeacherById(Integer id) {
        return tbTeacherService.getTeacherById(id);
    }

    @Override
    public void upTeacher(TbTeacher tbTeacher) {
        tbTeacherService.upTeacher(tbTeacher);
    }

    @Override
    public void upstatus(TbTeacher tbTeacher) {
        tbTeacherService.upstatus(tbTeacher);
    }

    @Override
    public void updatestatus(TbTeacher tbTeacher) {
        tbTeacherService.updatestatus(tbTeacher);
    }
}
